package com.spring.activemq.comsumer;

import javax.annotation.Resource;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;

import org.springframework.stereotype.Component;

import com.spring.security.web.service.MessageComsumer;
/**
 * topic消息消费者1
 * 
 * 作者: wjy 
 */
@Component
public class ObjectJmsReceiver  implements MessageListener {
	
	@Resource private MessageComsumer messageComsumer;

    @Override
    public void onMessage(Message message) {
        try {
        	messageComsumer.objectComsumer(message);
        } catch (JMSException e) {
            e.printStackTrace();
        }
    }
}
